package com.yq.cp.utils;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**

 * 拦截器

 */

@Configuration
public class BootWebAppConfigurer extends WebMvcConfigurerAdapter {

    @Bean
    public BootInterceptor get() {
        return new BootInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(get()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }
}



